//
//  DeviceDataMacro.h
//  
//
//  Created by limaohuyu on 2020/7/3.
//  Copyright © 2020 czw. All rights reserved.
//

#ifndef DeviceDataMacro_h
#define DeviceDataMacro_h

#define kKeyWindow [[[UIApplication sharedApplication] delegate] window]
#define kScreenBounds [UIScreen mainScreen].bounds
#define keyScreenWidth [UIScreen mainScreen].bounds.size.width
#define keyScreenHeight [UIScreen mainScreen].bounds.size.height

//获取状态栏的高度
#define SRARUS_HEIGHT [UIApplication sharedApplication].statusBarFrame.size.height
//安全区底部高度
#define SAFEARWA_BOTTOM_HEIGHT (iPhoneX ? 34 : 0)
//状态栏+导航栏高度
#define  SRARUSBAR_NAVIGATIONBAR_HEIGHT  (iPhoneX ? 88.f : 64.f)
//tabar高度
#define  SRARUSBAR_TABAR_HEIGHT  (iPhoneX ? 83.f : 49.f)


//根据安全区判断
#define iPhoneX \
({BOOL isPhoneX = NO;\
if (@available(iOS 11.0, *)) {\
isPhoneX = [[UIApplication sharedApplication] delegate].window.safeAreaInsets.bottom > 0.0;\
}\
(isPhoneX);})


#define IOS13_OR_ABOVE (([[[UIDevice currentDevice] systemVersion] intValue] >= 13) ? YES : NO)
#define IOS11_OR_ABOVE (([[[UIDevice currentDevice] systemVersion] intValue] >= 11) ? YES : NO)

//当前版本
#define ZXSystenVersion ([[[UIDevice currentDevice] systemVersion] floatValue])

//应用程序的名字
#define AppDisplayName [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"]


#endif /* DeviceDataMacro_h */
